BOOST_INC=/usr/include/boost
BOOST_LIB=/usr/lib

#CXX=g++

target:pyopt/core.so 

pyopt/core.so:pyopt.o
	$(CXX) -o $@ $< --shared -lboost_python -lgsl -lgslcblas -L${BOOST_LIB}

pyopt.o:pyopt.cpp
	$(CXX) -c -o $@ $< `python-config --includes` -I ../opt_utilities/ -I ../opt_serialization -DNDEBUG -I/usr/include/gsl -I${BOOST_INC} #-DHAVE_X_ERROR


clean:
	rm -f pyopt/core.so `find -iname *.o`
	find . -iname '*~' -delete
	rm -f pyopt/*.pyc
